package edu.nf.takeoutdemo.model.converter;

import edu.nf.takeoutdemo.model.dto.ShoppingCartDTO;
import edu.nf.takeoutdemo.model.entity.ShoppingCart;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 *
 * @author zjl
 * @date 2025/10/29
 */
@Mapper(componentModel = "spring")
public interface ShoppingCartConverter {
    @Mappings({
            @Mapping(source = "dishId",target = "dishId"),
            @Mapping(source = "setmealId",target = "setmealId"),
            @Mapping(source = "dishFlavor",target = "dishFlavor")
    })
    ShoppingCart toShoppingCart(ShoppingCartDTO shoppingCartDTO);
}
